<template>
    <div class="m-header">
        <div class="back" @click="clickBack" v-show="show">
            <i class="fa fa-chevron-left"></i>
        </div>
        {{title}}
    </div>
</template>

<script type="text/ecmascript-6">
export default {
  props: {
    title: {
      type: String,
      default: ""
    },
    show:{
        type:Boolean,
        default:false
    }
  },

  methods:{
      clickBack(){
          this.$emit('back')
      }
  }
};
</script>

<style scoped lang="stylus" rel="stylesheet/stylus">
@import '~common/stylus/variable';

.m-header {
    .back {
        position: absolute;
        width: 44px;
        left 0
        top 0
    }

    position: fixed;
    width: 100%;
    height: 44px;
    text-align: center;
    line-height: 44px;
    font-size: 16px;
    background: $color-main;
    color: #fff;
}
</style>